import java.util.*;
    public class jiejie {
        public static void main(String[] args) {
            List<Dish> menu= Arrays.asList(
                    new Dish("老人与海",800),
                    new Dish("三国演义",700),
                    new Dish("水浒传",400),
                    new Dish("西游记",530),
                    new Dish("红楼梦",350),
                    new Dish("格林童话",120),
                    new Dish("钢铁是怎样炼成的",550));
            List<Dish> lowCaloriesDish=new ArrayList<>();
            for(Dish d:menu)
            {
                if(d.getCalories()>100)
                    lowCaloriesDish.add(d);
            }
            Collections.sort(lowCaloriesDish,new Comparator<Dish>() {
                @Override
                public int compare(Dish o1, Dish o2) {
                    return Integer.compare(o1.getCalories(), o2.getCalories());
                }
            });
            for(Dish d:lowCaloriesDish)
                System.out.println(d.getName()+"  "+d.getCalories());
        }
    }

